package com.example.yiwei.crm.view.frament.customerDetailedMenuPackage;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.yiwei.crm.R;
import com.example.yiwei.crm.data.GetContact;
import com.example.yiwei.crm.entity.ContactMessageEntity;

/**
 * Created by Administrator on 2016/12/12.
 */

public class OtherFragment extends Fragment {
    ContactMessageEntity contact;
    private TextView txt_main_contact,txt_respectfully_called,txt_phone,txt_email,txt_weibo,txt_zip_code,txt_address;
    private Button button;
    LinearLayout linearLayout;
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootview=inflater.inflate(R.layout.fragment_customer_detailed_other,container,false);
        txt_main_contact= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_main_contact);
        txt_respectfully_called= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_respectfully_called);
        txt_phone= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_phone);
        txt_email= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_email);
        txt_weibo= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_weibo);
        txt_zip_code= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_zip_code);
        txt_address= (TextView) rootview.findViewById(R.id.fragment_detailed_other_txt_address);
        linearLayout= (LinearLayout) rootview.findViewById(R.id.linear_find_all_contacts);
        contact= GetContact.get();
        if (contact!=null){
            txt_main_contact.setText(contact.getContact_name());
            txt_respectfully_called.setText(contact.getContact_respectful());
            txt_phone.setText(contact.getFirst_contact_mobile_phone());
            txt_email.setText(contact.getContact_wechat());
            txt_zip_code.setText(contact.getContact_zip_code());
            txt_weibo.setText(contact.getContact_qq());
            txt_address.setText(contact.getContact_address());
        }


        return rootview;
    }
}
